import request from '@/utils/request'

// 分页
export function list${className}(query) {
  return request({
    url: '/${moduleName}/${pathName}/page',
    method: 'get',
    params: query
  })
}

// 新增
export function add${className}(form) {
  return request({
    url: '${moduleName}/${pathName}',
    method: 'post',
    data: form
  })
}

// 更新
export function update${className}(form) {
  return request({
    url: '/${moduleName}/${pathName}',
    method: 'put',
    data: form
  })
}

// 获取单条数据
export function get${className}(id) {
  return request({
    url: '/${moduleName}/${pathName}/' + id,
    method: 'get'
  })
}

// 删除
export function del${className}(ids) {
  return request({
    url: '/${moduleName}/${pathName}',
    method: 'delete',
    data: ids
  })
}
